package global

import (
	"os"

	"github.com/spf13/viper"
)

func InitConfig() {
	workDir, _ := os.Getwd()
	viper.SetConfigName("config.json")
	viper.AddConfigPath(workDir)
	viper.SetConfigType("json")
	err := viper.ReadInConfig()
	if err != nil {
		panic("配置文件加载失败")
	}
}
